<?php
require_once("layout_config.php");
require_once("include/permission.php");
require_once("include/project.php");

/* check if the user is logged. */
$user_id = permission_redirect_user("login.php");

$project_id = $_REQUEST["project"];

?>
<html>
	<head>
		<title><?=$layout_project_name?></title>
		<link type="text/css" rel="stylesheet" href="themes/<?=$layout_theme?>/main.css" />
		<script type='text/javascript' src='js/jquery.js'></script>
		<script type='text/javascript' src='js/jquery.progressbar.min.js'></script>
		<script type='text/javascript' src='js/utils.js.php'></script>
	</head>
<body>
<?php
$menu_module = "projects";
include("header.php");
?>
<center><h1>Project <?=project_get_name($project_id)?> summary</h1></center>
<table width="99%" border="0" cellpadding="0" cellspacing="0" align="center">
<tr>

<!-- List project members -->
<td with="50%">
	<table width="100%" border="0" cellpadding="1" cellspacing="1">
	<tr>
		<td colspan="5" class="project_members_title">
			<table width='100%' border='0' cellpadding='0' cellspacing='0'>
			<tr>
				<td align='center'><?=_("Members"); ?></td>
			</tr>
			</table>
		</td>
	</tr>
	<tr>
		<td width="20" class="project_members_subtitle">D</td>
		<td width="20" class="project_members_subtitle">M</td>
		<td class="project_members_subtitle"><?=_("Name")?></td>
		<td class="project_members_subtitle"><?=_("Role")?></td>
		<td class="project_members_subtitle"><?=_("Email")?></td>
	<tr>
<?php
	$members = project_get_members($project_id);
	if (!$members) {
?>		
	<tr>
		<td colspan="5">No members assigned to this project</td>
	</tr>
<?php
	} else {
		foreach($members as $member) {
?>
	<tr>
		<td align="center"><img src="themes/<?=$layout_theme?>/images/ico_delete.gif" /></td>
		<td align="center"><img src="themes/<?=$layout_theme?>/images/ico_modify.gif" /></td>
		<td><?=ucfirst($member["name"])." ".ucfirst($member["lastname"])?></td>
		<td align="center"><?=$member["role"]?></td>
		<td align="center"><a href="mailto:<?=$member["email"]?>"><?=$member["email"]?></a></td>
	</tr>
<?php
		}
	}
?>
	</table>
</td>
<!-- End of project members list. -->

<!-- Project status graph -->
<td width="50%">

</td>
<!-- End of project status graph -->
</tr>
<tr>
<td width="50%">

</td>
<td width="50%">

</td>
</tr>
</table>


</body>
</html>
